﻿using System;
using System.ComponentModel.DataAnnotations;
using System.ComponentModel.DataAnnotations.Schema;

namespace OpenFileTransfer.Wpf.Models
{
    /// <summary>
    /// 设备信息表
    /// </summary>
    [Table("device_info")]
    public class DeviceInfoModel
    {
        [Key]
        [Column("id", TypeName = "varchar(32)")]
        public string? Id { get; set; }

        /// <summary>
        /// 设备名称
        /// </summary>
        [Required]
        [Column("device_name", TypeName = "varchar(128)")]
        public string? DisplayName { get; set; }

        /// <summary>
        /// 备注名称
        /// </summary>
        [Required]
        [Column("remark_name", TypeName = "varchar(128)")]
        public string? RemarkName { get; set; }

        /// <summary>
        /// 是否本机：0-否，1-是
        /// </summary>
        [Required]
        [Column("is_self", TypeName = "tinyint")]
        public byte IsSelf { get; set; }

        /// <summary>
        /// 创建时间
        /// </summary>
        [Required]
        [Column("create_time", TypeName = "text")]
        public DateTime CreateTime { get; set; }

        /// <summary>
        /// 更新时间
        /// </summary>
        [Required]
        [Column("update_time", TypeName = "text")]
        public DateTime UpdateTime { get; set; }

        /// <summary>
        /// 备注
        /// </summary>
        [Column("remark", TypeName = "text")]
        public string? Remark { get; set; }
    }
}
